package com.zhisland.base.support.test.manager;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * 作者: guo yao
 * 日期: 2016年11月16日
 * 时间: 下午16:10
 */

@Controller
@RequestMapping(value = "/free")
public class FreeController {

    @Value("${project.author}")
    private String author;

    /**
     * 项目测试类
     *
     * @return
     */
    @RequestMapping(value = "/test/{id}", method = RequestMethod.GET)
    public ModelAndView freeTest(@PathVariable("id") String id) {
        ModelAndView mav = new ModelAndView();
        System.err.println();
        mav.addObject("result", author);
        mav.setViewName("free/index");
        return mav;
    }

}
